package org.nkumar.mesex;

import java.util.Map;
import java.util.HashMap;

public final class MesExRuleMetadataFactory
{
    private MesExRuleMetadataFactory()
    {
    }

    public static MesExRuleMetadata createJDKLoggerMesExRuleMetadata()
    {
        Map<String, Integer> methodParamIndices = new HashMap<String, Integer>();
        methodParamIndices.put("config", 0);
        methodParamIndices.put("fine", 0);
        methodParamIndices.put("finer", 0);
        methodParamIndices.put("finest", 0);
        methodParamIndices.put("info", 0);
        methodParamIndices.put("severe", 0);
        methodParamIndices.put("warning", 0);
        methodParamIndices.put("log", 1);
        methodParamIndices.put("logp", 3);
        methodParamIndices.put("logrb", 4);
        return new MesExRuleMetadata("Logger", "java.util.logging.Logger", methodParamIndices);
    }

    public static MesExRuleMetadata createEasyLoggerMesExRuleMetadata()
    {
        Map<String, Integer> methodParamIndices = new HashMap<String, Integer>();
        methodParamIndices.put("error", 0);
        methodParamIndices.put("warn", 0);
        methodParamIndices.put("info", 0);
        methodParamIndices.put("config", 0);
        methodParamIndices.put("debug", 0);
        methodParamIndices.put("trace", 0);
        return new MesExRuleMetadata("EasyLogger", "org.nkumar.logging.EasyLogger", methodParamIndices);
    }

    public static MesExRuleMetadata createResourceBundleMesExRuleMetadata()
    {
        Map<String, Integer> methodParamIndices = new HashMap<String, Integer>();
        methodParamIndices.put("getString", 0);
        return new MesExRuleMetadata("ResourceBundle", "java.util.ResourceBundle", methodParamIndices);
    }
}
